package org.edu.service.impl;

import java.util.List;

import org.edu.dao.RolesDao;
import org.edu.model.Roles;
import org.edu.service.RolesService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;

@Repository
public class RolesServiceImpl implements RolesService {

	@Autowired
	private RolesDao rolesDao;
	public RolesServiceImpl() {
		// TODO Auto-generated constructor stub
	}

	@Transactional
	public void update(Roles roles) throws Exception {
		rolesDao.update(roles);
	}

	@Transactional
	public List<Roles> roles() {
		return rolesDao.roles();
	}

	@Transactional
	public Roles findById(Long roles_id) throws Exception {
		return rolesDao.findById(roles_id);
	}

}
